<%= javascript_include_tag 'pagination' %>

<div class="portlet">
  <div class="portlet-header">
    <h1><%=t ".title"%></h1>
  </div>
  <div class="portlet-content">
    <% form_for(@profile, :url => profile_path) do |f| %>
      <%= f.error_messages %>

      <table>
        <tbody>
                <tr>
                <td>
                  <%= f.label :contact, t('activerecord.attributes.profile.contact') %>
                </td>
                <td>
                  <%= text_field_tag 'profile_contact_name',params[:profile_contact_name], {:disabled => true, :size => 30} %>
                </td>
                <td >
                  <div id='basic-modal-contact_selector'>
                    <a href='#' class='basic'><%=t('btn_selected')%></a>
                  </div>
                </td>
                <td>
                  <%= hidden_field(:profile, :contact_id)%>
                </td>
              </tr>

              <tr>
                <td>
                  <%= label_tag 'reference', t('activerecord.attributes.profile.reference') %>
                </td>
                <td>
                  <%= text_field_tag 'profile_reference_name',params[:profile_reference_name], {:disabled => true, :size => 30} %>
                </td>
                <td >
                  <div id='basic-modal-profile_selector'>
                    <a href='#' class='basic'><%=t('btn_selected')%></a>
                  </div>
                </td>
                <td>
                  <%= hidden_field(:profile, :reference_id)%>
                  <%= hidden_field(:profile, :reference_type) %>
                </td>
              </tr>
              <tr>
                <td>
                  <%= label_tag :excluded, t('activerecord.attributes.profile.excluded') %>
                </td>
                <td>
                  <%= f.check_box :excluded%>
                </td>
              </tr>
        </tbody>
      </table>

      <div class="line-buttons">
        <%= f.submit t('btn_update') %>
      </div>
      <div class="line-links">
        <%= link_to t('btn_show'), profile_path(@profile) %> |
        <%= link_to t('btn_back'), profiles_redirect_back_path(profiles_path) %>
      </div>
    <% end %>
  </div>
  <div class="portlet-footer">
  </div>
</div>

<div id="basic-modal-content-profile_selector" style="display:none;">
  <%= render :partial=>'profiles_selector' %>
</div>

<div id="basic-modal-content-contact_selector" style="display:none;">
  <%= render :partial=>'contacts/selector_contacts' %>
</div>